<layout name="layout"/>

<p>
<a href="__MODULE__/News/index" class="uk-button uk-button-success" >
{$Think.lang.back}
</a>
<button class="uk-button uk-button-primary" data-uk-modal="{target:'#myModal',center:true}">
{$Think.lang.add_news_type}
</button>
</p>

          <div class="uk-overflow-container">
            <table class="uk-table uk-table-hover uk-table-striped uk-table-condensed">
	<thead>
		<th>#</th>		<th>{$Think.lang.news_type}</th>		<th>{$Think.lang.lang}</th>	<th>{$Think.lang.add_time}</th>	
				<th>--</th>
	</thead>
	<tbody>
		<volist name="list" id="vo">
		<tr>
			<td><a href="__CONTROLLER__/details/{$vo.np_id}">{$vo.np_id}</a></td><td>{$vo.np_name}</td>
			<td>{$vo.np_lang}</td>
			<td>{$vo.np_time}</td>
			<td>
				<a href="javascript:void(0)" onclick="confirmDelete('__CONTROLLER__/deleteHandle/{$vo.np_id}')">
					<i class="uk-icon-trash"></i>
				</a>
			</td>
		</tr>
		</volist>
	</tbody>
</table>
</div>
{$page}

<!-- Modal -->
<div class="uk-modal" id="myModal">
 <form id="validate_form" class="uk-form"  method="post" action="__CONTROLLER__/addHandle">
    <div class="uk-modal-dialog"> <a class="uk-modal-close uk-close"></a>
        <div class="uk-modal-header">{$Think.lang.add_news_type}</div>

<table class="uk-table">
	<tr><td>{$Think.lang.news_type}</td><td>
<input type="text" name="np_name"   required  value="{$np_name}" />
</td></tr>
<tr><td>{$Think.lang.lang}
</td><td>
<select name="np_lang" required>
<option value="">--</option>
<volist name=":explode(',',$web_config['web_lang'])" id="vo">
<option <eq name="vo" value="$np_lang">selected</eq> value="{$vo}">{$vo}</option>
</volist>
</td></tr>
  </table>
        <div class="uk-modal-footer uk-text-right">
		<button class="uk-button uk-button-danger" type="submit">{$Think.lang.save}</button>
		</div>
    </div>
  </form> 
</div>